package com.taobaolite.item;

import javax.validation.constraints.NotNull;

public class ItemBody {

    // TODO: 加上RequestBody约束
    @NotNull
    private Long itemId;
    private String name;
    private Double price;
    private String description;
    private String imageDir;
    private Long amount;
    private Long storeId;

    public ItemBody() {}

    public ItemBody(Item item) {
        itemId = item.getItemId();
        name = item.getName();
        price = item.getPrice();
        description = item.getDescription();
        imageDir = item.getImageDir();
        amount = item.getAmount();
        storeId = item.getItemId();
    }

    public Long getItemId() {
        return itemId;
    }

    public void setItemId(Long itemId) {
        this.itemId = itemId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getImageDir() {
        return imageDir;
    }

    public void setImageDir(String imageDir) {
        this.imageDir = imageDir;
    }

    public Long getAmount() {
        return amount;
    }

    public void setAmount(Long amount) {
        this.amount = amount;
    }

    public Long getStoreId() {
        return storeId;
    }

    public void setStoreId(Long storeId) {
        this.storeId = storeId;
    }
}
